<!doctype html>
<html>
<head>
<?php $this->load->view('admin/common_head'); ?>
</head>
<body>
<div class="wrap J_check_wrap">
	<div class="nav">
		<ul class="cc">
			<li class="current"><a href="<?php echo site_url('admin/hire/index'); ?>">出售房源管理</a></li>
		</ul>
	</div>
	<div class="h_a">搜索</div>
	<div class="search_type cc mb10">
		<form action="<?php echo site_url('admin/hire/index'); ?>" method="get">
			<div class="mb10">
				<label>用户名：</label>
				<input name="username" type="text" class="input length_2 mr10" value="<?php echo $get['username']; ?>" />
				<label>标题或小区名：</label>
				<input name="gate" type="text" class="input length_6 mr10" value="<?php echo $get['gate']; ?>" />
			</div>
			<div class="mb10">
				<label>所属区域：</label>
				<select name="areatype" class="mr10">
					<option value="-1" <?php echo set_select('areatype', -1, $get['areatype'] == -1); ?>>不限制</option>
				</select>
				<label>所属商圈：</label>
				<select name="platetype" class="mr10">
					<option value="-1" <?php echo set_select('platetype', -1, $get['platetype'] == -1); ?>>不限制</option>
				</select>
				<label>推广方式：</label>
				<select name="top_urgent" class="mr10">
					<option value="-1" <?php echo set_select('top_urgent', -1, $get['top_urgent'] == -1); ?>>不限制</option>
				</select>
				<label>状态：</label>
				<select name="state" class="mr10">
					<option value="-1" <?php echo set_select('state', -1, $get['state'] == -1); ?>>不限制</option>
				</select>
				<button type="submit" class="btn">搜索</button>
			</div>
		</form>
	</div>
	<form action="<?php echo site_url('admin/hire/dels'); ?>" method="post">
		<div class="table_list">
			<table width="100%">
				<colgroup>
					<col width="80" />
					<col width="80" />
					<col width="100" />
					<col />
					<col width="80" />
					<col width="100" />
					<col width="60" />
					<col width="80" />
					<col width="130" />
					<col width="100" />
				</colgroup>
				<thead>
					<tr>
						<td><label><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x">全选</label></td>
						<td>区域</td>
						<td>小区名</td>
						<td>标题</td>
						<td>推广</td>
						<td>户型</td>
						<td>总价</td>
						<td>作者</td>
						<td>发布时间</td>
						<td>操作</td>
					</tr>
				</thead>
				<tbody>
				<?php
					foreach($hireinfos as $value)
					{
						$istop = $isurgent = '';
						$value['istop'] == 1 && $istop = '<span class="blue">顶</span>';
						$value['isurgent'] ==1 && $isurgent = '<span class="red">急</span>';
				?>
					<tr>
						<td><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="houseids[]" value="<?php echo $value['houseid']; ?>" ></td>
						<td><?php echo $value['areatype']; ?></td>
						<td><?php echo $value['village']; ?></td>
						<td><?php echo $value['subject']; ?></td>
						<td><?php echo $istop . ' ' . $isurgent; ?></td>
						<td><?php echo $value['roomtype']; ?></td>
						<td><?php echo $value['price']; ?></td>
						<td><?php echo $value['username']; ?></td>
						<td><?php echo date('Y-m-d H:i', $value['posttime']); ?></td>
						<td>
						<?php if($value['istop'] == 0){ ?>
							<a href="<?php echo site_url('admin/hire/top?istop=1&houseid='.$value['houseid']); ?>" class="mr10" title="置顶">[置顶]</a>
						<?php } else { ?>
							<a href="<?php echo site_url('admin/hire/top?istop=0&houseid='.$value['houseid']); ?>" class="mr10 red" title="取消置顶">[置顶]</a>
						<?php } if($value['isurgent'] == 0){ ?>
							<a href="<?php echo site_url('admin/hire/urgent?isurgent=1&houseid='.$value['houseid']); ?>" title="加急">[加急]</a>
						<?php } else { ?>
							<a href="<?php echo site_url('admin/hire/urgent?isurgent=0&houseid='.$value['houseid']); ?>" class="red" title="取消加急">[加急]</a>
						<?php } ?>
						</td>
					</tr>
				<?php } ?>
				</tbody>
			</table>
		</div>
		<div class="btn_wrap">
			<div class="btn_wrap_pd">
				<label class="mr20"><input type="checkbox" class="J_check_all" data-direction="y" data-checklist="J_check_y">全选</label>
				<button type="submit" class="btn J_ajax_submit_btn">删除</button>
			</div>
		</div>
	</form>
</div>
<?php $this->load->view('admin/common_footer'); ?>
</body>
</html>